/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package toesp.testing;

import java.util.ArrayList;
import java.util.List;
import toesp.bean.GroupmenuBean;
import toesp.bean.MenuBean;
import toesp.entity.Groupmenu;
import toesp.entity.Menu;

/**
 *
 * @author satria.sp
 */
public class GrupMenuTesting {
    public static void main(String[] args) {
        GroupmenuBean objGrupMenuBean  = new GroupmenuBean();
        MenuBean objGroupBean = new MenuBean();
        
        try {
            Menu gp = objGroupBean.getOnebyId("mnuMasterData");

            List<Groupmenu> lstGrupMenu = objGrupMenuBean.getAllByGroup(1);  
            ArrayList<Menu> lstMenu = new ArrayList<Menu>();
            for (Groupmenu groupmenu : lstGrupMenu) { 
                Menu menu = groupmenu.getMenu();
                lstMenu.add(menu);
            }

//             if(lstMenu.contains(gp)){
//                 System.out.println("Ada");
//             }else{
//                 System.out.println("Tidak Ada");
//             } 
        } catch (Exception e) {
        }
        
        
        
    }
}
